
/**
* 技能数据
*/
class BaseInfo {
    /** 上次攻击时间 */
    public prehitTime: number = 0;
    /** 冷却时间倒计时动画 */
    public times: number = 0;
    /** 冷却时间 */
    public hitDelayTime: number = 90*60;  //秒数*帧频
    /** 冷却时间初始数据容器 */
    public hitDelayTimeTmp: number = this.hitDelayTime;
    /** 伤害 */
    public hitBlood: number = 100;
    /** 伤害初始数据容器 */
    public hitBloodTmp: number = this.hitBlood;
    /** 持续时间 */
    public durationTime: number = 60;
    /** 持续时间初始数据容器 */
    public durationTimeTmp: number = this.durationTime;
    /** 名字 */
    public name: string = "技能名字";
    /** 升级花费 */
    public consume: number = 2000;
    public consumeTmp: number = this.consume;
    
    /** level */
    public _level: number = 1;
    public set level(value: number) {
        this._level = value;
        this.hitBlood = Math.round(this.hitBloodTmp * Math.pow(1.4, this._level)) ;
        this.hitDelayTime = Math.round(this.hitDelayTimeTmp * Math.pow(0.995, this._level)) ;
        this.durationTime = Math.round(this.durationTimeTmp * Math.pow(1.005, this._level)) ;
        this.consume = Math.round(this.consumeTmp * Math.pow(1.4, this._level)) ;
    }
    public get level(): number {
        return this._level;
    }
    public backups() {
        this.hitBloodTmp = this.hitBlood;
        this.hitDelayTimeTmp = this.hitDelayTime;
        this.durationTimeTmp = this.durationTime;
        this.consumeTmp = this.consume;
	}
	
    
}